package com.xcity.pomelo.response;

import com.xcity.db.entity.Guild;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class ApplyJoinResponse extends Response {
	private long target;
	private GuildSimpleInfo newGuild = null;
	public static class GuildSimpleInfo{
		public long guildId;
		public String name;
		public GuildSimpleInfo(Guild guild){
			this.guildId = guild.getId();
			this.name = guild.getName();
		}
	}
	public ApplyJoinResponse(int serial, Guild guild) {
		super(serial);
		if(guild != null){
			newGuild = new GuildSimpleInfo(guild);
		}
	}
	
	public ApplyJoinResponse(int serial, long target){
		super(serial);
		this.target = target;
	}
	
	public GuildSimpleInfo getNewGuild() {
		return newGuild;
	}
	public void setNewGuild(GuildSimpleInfo newGuild) {
		this.newGuild = newGuild;
	}
	public long getTarget() {
		return target;
	}
	public void setTarget(long target) {
		this.target = target;
	}
}
